{% extends "base.html" %}

{% block title %}News{% endblock %}


{% block content %}

{% if news_list %}

{% for news in news_list %}
<h2>{{news.header}}</h2>
<p class="post-info">Posted by {{ news.author}}</p>

<p>{{news.text}}</p>

<p class="post-footer">
    <a href="news.html" class="readmore">Read more</a> |
    <a href="news/{{news.id}}" class="comments">Comments ({{news.comments_count}})</a> |
    <span class="date">{{news.pub_date.date}}</span>

</p>
{% endfor %}

{% else %}
<p>No news.</p>
{% endif %}

{% endblock %}